package com.godfrey.mapper;

import com.godfrey.pojo.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * description : EmployeeMapper
 *
 * @author godfrey
 * @since 2020-05-28
 */
@Mapper
@Repository
public interface EmployeeMapper {

    // 获取所有员工信息
    List<Employee> getEmployees();

    // 新增一个员工
    int save(Employee employee);

    // 通过id获得员工信息
    Employee get(@Param("id") Integer id);

    // 通过id删除员工
    int delete(@Param("id") Integer id);
}